This application claims the priority benefit of Taiwan application serial no. 88122233, filed Dec. 17, 1999.
1. Field of the Invention
The invention relates in general to an echo canceller, and more particularly, to a design of a divergence detector which converts the divergent state into a convergent state, so as to stably operate the echo canceller.
2. Description of the Related Art
An echo canceller is commonly used in a handset of a phone to eliminate unnecessary echo. For example, while transferring a two-line system to a four-line system in a telephone network, an echo occurs if the impedance matching is not met, or in the application of a speaker phone, the voice is reflected in the chamber-like space to produce an echo. However, the conventional echo canceller can only eliminate the echo in one direction. Only during a one-direction talk (the direction that produces the echo), the echo canceller may adjust a coefficient for eliminating the echo. However, while the coefficient is not ideally convergent, a double talk detector is required to detect the one-direction talk. Various kinds of methods to fabricate the double talk detector have been developed. In the following paragraphs, two common types of the double talk detectors are introduced.
As shown in FIG. 1, a conventional echo canceller 14 is coupled between a receiving line (input line) 10 and an output line 12. The receiving line 10 has a terminal used as a first input terminal 16 for receiving an external input signal Rin, and a terminal used as a first output terminal 18 for an external output signal Rout. The output line has a terminal used as a second input terminal 20 for an acoustic input signal Sin, and a terminal used as a second output terminal 22 for an acoustic output signal Sout. The external output signal Rout is output via a receiving set 24, while the microphone 26 outputs the acoustic input signal Sin at the second input terminal 20. Between the receiving set 24 and the microphone 26, the output signal of the receiving set 24 overlaps with the acoustic input signal Sin to cause an echo 28. Meanwhile, the double talk detector of the echo canceller has to start detecting to effectively eliminate the echo 28.
For a first type of double talk detector in a echo canceller, while the acoustic input signal Sin has a magnitude larger a half of the external output signal Rout, it is thus determined as a double talk that immediately freezes the coefficient adjustment of the echo cancller. This method can be applied as a line echo canceller. However, this kind of echo canceller can not be applied to an echo canceller required for a receiving set since the distance between the speaker and the microphone is variable to cause variable magnitudes of echoes.
A second type of the double talk of an echo canceller is to determine according to the value of echo return loss enhancement (ERLE), wherein
ERLE=Sin/Sout
When ERLE is larger than a certain constant, the echo coefficient is adjusted. In this manner, ERLE can effectively determine while the coefficient is convergent. However, before being convergent, an error can be caused to latch up the coefficient of the echo cancellation. The echo coefficient thus can never be converged.
The invention provides an echo canceller. The echo canceller comprises an adjust-type filter, an echo return loss enhancement device, a divergence detector and a double talk detector. The echo canceller is suitable for use between a receiving line and an output line. The receiving line has a terminal used as a first input terminal for an external input signal, and a terminal used as a first output terminal for an external output signal. The output line has a terminal used as a second input terminal for an acoustic input signal, and a terminal used as a second output terminal for an acoustic output signal.
The adjust-type filter is coupled between the first output terminal and the second input terminal to receive the external output terminal and to produce an echo cancellation signal after adjusting a coefficient of the echo canceller. The echo return loss enhancement device is coupled between the second input terminal and the second output terminal to output an adjusting signal according to the acoustic input signal and the acoustic output signal. In addition, a subtrator is coupled between the second input terminal, the second output terminal and the adjust-type filter to output the acoustic output signal after receiving the acoustic input signal and the echo cancellation signal. The divergence detector is coupled between the first input terminal and the echo return loss enhancement device to perform a divergence/convergence determination and to output a divergent/convergent signal after receiving the external input signal and the adjusting signal. The double talk detector is coupled to the first input terminal, the adjust-type filter, the echo return loss enhancement device and the divergence detector. While receiving the external input signal, the adjust signal and the divergent/convergent signal, the double talk detector outputs a control adjusting coefficient signal to the adjust-type filter.
In the above structure, the acoustic output signal includes a resulting signal by subtracting the acoustic input signal with the echo cancellation signal, while the second output terminal outputs an adjusting echo cancellation signal to control the cancellation signal of the adjust-type filter.
With the addition of the divergence detector to receive the external input signal and the adjust signal, so as to control the divergent/convergent signal input to the double detector, the vatiation of the coefficient of the echo canceller can be well controlled. In this manner, the previously divergent signal can be improved to be more convergent.
In addition, the adjust signal output by the echo return loss enhancement device is actually a ratio of the acoustic input signal to the acoustic output signal. While the adjust signal is smaller than a convergent constant, or the absolute value of the external input signal is smaller than an input constant, the control adjusting coefficient freezes the coefficient of the adjust-type filter, and the convergent constant is larger than 1.
On the other hand, for the divergence detector, while the absolute value of the external input signal is larger than the input constant, and the adjust signal is larger than the convergent constant, a convergent signal is output. In contrast, when the absolute value of the external input signal is larger than the input constant and the adjust signal is smaller than the divergent constant, a divergent signal is output. The divergent signal enables the control adjust coefficient signal output from the double talk detector to eliminate the coefficient of the adjust-type filter.
The invention further provides a method to cancel echo. The method is suitable for use between an external input signal, an external output signal, an acoustic input signal and an acoustic output signal.
An echo cancellation signal is produced to eliminate the effect of the mixing the acoustic input signal with the external output signal. According to the acoustic input signal and the acoustic output signal, an adjust signal is produced. A divergent/convergent signal is further produced according to the external input signal, the adjust signal and the divergent/convergent signal. According to the external input signal, the adjust signal and the divergent/convergent signal, a control adjusting coefficient signal is produced to control the echo cancellation signal. According to the acoustic input signal and the echo cancellation signal, the acoustic signal signal is output and an adjust echo cancellation signal is output to eliminate the echo cancellation signal.
Both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.